//定义全部接口返回数据都拥有ts类型
export interface ResponseData {
  code: number
  msg: string
  success: boolean
}

//代表一个账号信息的ts类型
export interface User {
  userId?: number
  deptId?: number
  sex?: number
  createTime?: string
  updateTime?: string
  userName?: string
  nickName?: string
  email?: string
  phonenumber?: string
  userType?: string
  avatar?: string
  password?: string
  status?: string
  delFlag?: string
  String?: string
  loginDate?: string
  createBy?: string
  updateBy?: string
  remark?: string
}

//数组包含全部的用户信息
export type Records = User[]

//获取全部用户信息接口返回的数据ts类型
export interface UserResponseData extends ResponseData {
  data: {
    records: Records
    total: number
    size: number
    current: number
    pages: number
  }
}

//根据条件进行查询携带的参数的ts类型
export interface userFormData {
  nickName?: string
  status?: string
  sex?: string
  phonenumber?: string
  userType?: string
}

//代表一个职位的ts类型
export interface RoleData {
  roleId?: number
  createTime?: string
  updateTime?: string
  roleName: string
  remark: null
}
//全部职位的列表
export type AllRole = RoleData[]
//获取全部职位的接口返回的数据ts类型
export interface AllRoleResponseData extends ResponseData {
  data: {
    userRoles: AllRole
    sysRoles: AllRole
  }
}

//给用户分配职位接口携带参数的ts类型
export interface SetRoleData {
  roleIdList: number[]
  userId: number
}
